package top.i51213.fastaction.view;

import android.os.SystemClock;

public class Debug {
    public static void debug(String tag,Runnable runnable){
       long start= SystemClock.uptimeMillis();
       runnable.run();
        System.out.println(tag+":"+(SystemClock.uptimeMillis()-start));
    }
    public interface XRunnable<T>{
        T run();
    }
    public static<T> T debug(String tag,XRunnable<T> runnable){
        long start= SystemClock.uptimeMillis();
        T t=runnable.run();
        System.out.println(tag+":"+(SystemClock.uptimeMillis()-start));
        return t;
    }
}
